home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 018a / zip2zi31.zip / ZIP2-001.BAT < prev    next >
DOS Batch File  |  1993-05-31  |  4KB  |  76 lines

  1. @Echo off
  2. Rem ZIP2-001.BAT Initial System Evaluation/Query For Evars and Files.
  3. IF NOT Exist ZIP2-FSZ.BAT Echo      ZIP2-FSZ.BAT is Also Required for these tests.
  4. IF NOT Exist ZIP2-FSZ.BAT GoTo TRY_AGAIN
  5. CLS
  6. Echo Your System Is Safe To Run ZIP2ZIP If No Reserved Variables Are In Use,
  7. Echo No Reserved FileNames Are In Use, And Environment Is Reported as OK.
  8. Echo.
  9. Echo For Any In Use, Find Out If They Can Be Safely Eliminated For Now.
  10. Echo And If So, Run ZiP2-OK2.BAT To Clear.
  11. Echo.
  12. IF NOT "%FSIZE%"==""     Echo Environment Variable "FSIZE" In Use as "%FSIZE%"
  13. IF NOT "%ZDATE%"==""     Echo Environment Variable "ZDATE" In Use as "%ZDATE%"
  14. IF NOT "%ZTIME%"==""     Echo Environment Variable "ZTIME" In Use as "%ZTIME%"
  15. IF NOT "%ZNAME%"==""     Echo Environment Variable "ZNAME" In Use as "%ZNAME%"
  16. IF NOT "%CNZL%"==""      Echo Environment Variable "CNZL"  In Use as "%CNZL%"
  17. IF NOT "%EVCHK40%"==""   Echo Environment Variable "EVCHK40" In Use as "%EVCHK40%"
  18. IF NOT "%EVCHK30%"==""   Echo Environment Variable "EVCHK30" In Use as "%EVCHK30%"
  19. IF NOT "%SAFETY%"==""    Echo Environment Variable "SAFETY"  In Use as "%SAFETY%"
  20. IF NOT "%DONE_B%"==""    Echo Environment Variable "DONE_B"  In Use as "%DONE_B%"
  21. IF NOT "%DONE_C%"==""    Echo Environment Variable "DONE_C"  In Use as "%DONE_C%"
  22. For %%f IN (Temp_$$$.BAT ZIP2-FSZ. ZIP2-FSZ.$$$ ZIP2ZIP.$$$ EV0.FLG) DO IF Exist %%f Echo File "%%f" Is Present
  23. For %%f IN (#2DO_B. #2DO_C. #AT_B. #AT_C. #DONE_B. #DONE_C.        ) DO IF Exist %%f Echo File "%%f" Is Present
  24. Echo.
  25. CALL ZIP2ZIPA.BAT
  26. Echo     Now Testing ATTRIB +r +h +s /S
  27. Echo.
  28. Md Z_B
  29. Cd Z_B
  30. Echo a > ReadOnly.Fle
  31. ATTRIB   ReadOnly.Fle +r +h +s
  32. Cd..
  33. ATTRIB   ReadOnly.Fle -r -h -s /S
  34. Cd Z_B
  35. DEL ReadOnly.Fle >NUL
  36. IF NOT Exist ReadOnly.Fle Echo Current DOS's ATTRIB.EXE IS Suitable For ZIP2ZIP, If No Syntax Msgs.
  37. IF NOT Exist ReadOnly.Fle GoTo FIND&COMP
  38. Echo Current DOS's ATTRIB.EXE Not Suitable For ZIP2ZIP
  39. Attrib ReadOnly.fle -r -h -s
  40. Del ReadOnly.Fle >Nul
  41. Echo.
  42. Echo   Any Syntax Error Message Indicates That The Attrib.Exe is Not Suitable
  43. Echo   For Use With .ZIP Files That May Contain Files Of These Attributes.
  44. Echo   If +r +h +s Files Are Encountered And Not Cleaned Up, They Will
  45. Echo   Be Included In ALL Subsequent .ZIPS! BE VERY CAREFUL OF THIS OPTION.
  46. Echo   Older Dos Vers Could Only Set The +-r Attribute. This Test Attempted
  47. Echo   To Set +r +h +s And Then Turn Them Off.
  48. Echo.
  49. :FIND&COMP
  50. CD..
  51. RD Z_B
  52. Echo.
  53. Echo Testing FIND and COMP
  54.     IF Exist ZIP2-FSZ. Echo File ZIP2-FSZ. is Present..Resolve and Rerun %0
  55.     IF Exist ZIP2-FSZ. GoTo TRY_AGAIN
  56.     Echo aaa>ZIP2-FSZ.
  57. Copy         ZIP2-FSZ. ZIP2-FSZ.$$$ >Nul
  58. Echo N| Comp ZIP2-FSZ. ZIP2-FSZ.$$$ | Find "OK" >ZIP2-FSZ.
  59.         CALL ZIP2-FSZ.BAT
  60. Echo.
  61. IF     "%FSIZE%"=="" GoTo MajorError
  62. IF NOT "%FSIZE%"=="0" Echo   Your DOS Handles COMP and FIND Correctly
  63. IF     "%FSIZE%"=="0" Echo   Your DOS Handles COMP and FIND INCORECTLY! See .Doc.
  64. For %%f IN (ZIP2-FSZ. ZIP2-FSZ.$$$) Do IF Exist %%f DEL %%f >NUL
  65. IF     "%PKTMP%"=="" Echo And..You Might Want To Consider Setting PKTMP To a FastDrive. See PKWARE's .doc
  66. IF NOT "%PKTMP%"=="" Echo And.. PKTMP Is Currently Set To: %PKTMP%
  67. GoTo End
  68. :MajorError
  69. Echo Major Error in Logic or DOS System Cmds.
  70. :End
  71. Echo.
  72. Echo If Environment Variables Do NOT "Belong" To THIS Program..Quit and FIX
  73. Echo Then Run ZIP2-OK2.BAT To Clear The Variables and Files.
  74. Echo IF SubDir Z_B Was Left By "Attrib Failure" Delete it. Run ZIPRDZ_B.BAT
  75. :TRY_AGAIN
  76.